if select(2, UnitClass("player")) ~= "PALADIN" then return end
local GetPlayerBuffName = GetPlayerBuffName
local GetSpellInfo = GetSpellInfo
local GetTrackingTexture = GetTrackingTexture
local IsEquippedItem = IsEquippedItem
local UnitCreatureType = UnitCreatureType
local UnitAttackSpeed = UnitAttackSpeed
local GetShieldBlock = GetShieldBlock
local math_floor = math.floor
local string_match = string.match
local string_find = string.find
local string_lower = string.lower
local tonumber = tonumber
local select = select
local pairs = pairs
local UnitBuff = UnitBuff

--NOTE: One-Handed Weapon Specialization is handled by API (7th return of UnitDamage("player"), Two-Handed Weapon Specialization is multiplied into weapon damage range

function DrDamage:PlayerData()
	
	--General
	--Sense Undead
	local undead = string_lower(GetSpellInfo(5502))
	local sol = GetSpellInfo(53501)
	local rv = GetSpellInfo(53380)
	self.Calculation["PALADIN"] = function( calculation, ActiveAuras, BuffTalentRanks, spell, baseSpell )
		if not baseSpell.Melee then
			if calculation.healingSpell then
				if BuffTalentRanks["Improved Devotion Aura"] and ActiveAuras["Improved Devotion Aura"] then
					calculation.dmgM = calculation.dmgM * (1 + BuffTalentRanks["Improved Devotion Aura"])
				end
				if BuffTalentRanks["Sheath of Light"] then
					calculation.extraCrit = BuffTalentRanks["Sheath of Light"]
					calculation.extraTicks = 4
					calculation.extraChanceCrit = true
					calculation.extraName = sol
				end
			end
		else
			if calculation.group == "Judgement" then
				--Glyph of Judgement
				if self:HasGlyph(54922) then
					calculation.dmgM = calculation.dmgM * 1.1
				end
				if self:GetSetAmount( "Redemption Plate" ) >= 4 then
					calculation.cooldown = calculation.cooldown - 1
				end
				if self:GetSetAmount( "PvP Retri" ) >= 4 then
					calculation.cooldown = calculation.cooldown - 1
				end
			end
			if BuffTalentRanks["Righteous Vengeance"] then
				calculation.extraDamage = 0
				calculation.extraChanceCrit = true
				calculation.extraCrit = BuffTalentRanks["Righteous Vengeance"]
				calculation.extraTicks = 4
				calculation.extraName = rv
			end
		end
		if self:HasGlyph(57947) and (GetTrackingTexture() == "Interface\\Icons\\Spell_Holy_SenseUndead") and not calculation.healingSpell then
			local target = UnitCreatureType("target")
			if target and string_find(undead,string_lower(target)) then
				calculation.dmgM = calculation.dmgM * 1.01
			end
		end
	end
	
	--Talents
	self.Calculation["Two-Handed Weapon Specialization"] = function( calculation, value )
		if self:GetNormM() == 3.3 and calculation.WeaponDamage then
			calculation.wDmgM = calculation.wDmgM * (1 + value)
			calculation.dmgM = calculation.dmgM * (1 + value)
		end
	end
	--Sense Undead, Sense Demons, Track Humanoids, Track Elementals
	local crusade = string_lower(GetSpellInfo(5503) .. GetSpellInfo(5500) .. GetSpellInfo(19883) .. GetSpellInfo(19880))
	self.Calculation["Crusade"] = function( calculation, talentValue )
		if not calculation.healingSpell then
			local target = UnitCreatureType("target")
			if target and string_find(crusade, string_lower(target)) then
				calculation.dmgM = calculation.dmgM * ( 1 + talentValue )
			end
		end
	end
	
	--Spells
	self.Calculation["Flash of Light"] = function( calculation, ActiveAuras )
		--PvP Healer Glove Flash of Light Bonus
		if self:GetSetAmount( "PvP Healing Gloves" ) >= 1 then
			calculation.critPerc = calculation.critPerc + 2
		end
		--Glyph of Flash of Light
		if self:HasGlyph(54936) then
			calculation.critPerc = calculation.critPerc + 5
		end
	end
	self.Calculation["Shield of Righteousness"] = function( calculation )
		local bv = (GetShieldBlock() * 1.3)
		calculation.minDam = calculation.minDam + bv 
		calculation.maxDam = calculation.maxDam + bv
	end
	self.Calculation["Avenger's Shield"] = function( calculation, _, _, baseSpell )
		if self:HasGlyph(54930) then
			--Glyph of Avenger's Shield
			calculation.dmgM = calculation.dmgM * 2
			baseSpell.chainFactor = nil
		end
	end
	--Sense Undead, Sense Demons
	local exorcism = string_lower(GetSpellInfo(5503) .. GetSpellInfo(5500))
	self.Calculation["Exorcism"] = function( calculation )
		local target = UnitCreatureType("target")
		if target and string_find(exorcism, string_lower(target)) then
			calculation.critPerc = 100
		end
		--Glyph of Exorcism
		if self:HasGlyph(54934) then
			calculation.dmgM = calculation.dmgM * 1.2
		end
	end
	self.Calculation["Hammer of the Righteous"] = function( calculation )
		local min, max = self:GetMainhandBase()
		local spd = self:GetWeaponSpeed()
		if min > 0 then
			calculation.minDam = calculation.minDam + ((min+max)/(2 * spd)) * 4
			calculation.maxDam = calculation.minDam
		else
			calculation.zero = true
		end
		--Glyph of Hammer of the Righteous
		if self:HasGlyph(63219) then
			calculation.Hits = calculation.Hits + 1
		end
	end
	self.Calculation["Consecration"] = function( calculation )
		--Glyph of Consecration
		if self:HasGlyph(54928) then
			calculation.eDuration = calculation.eDuration + 2
			calculation.cooldown = calculation.cooldown - 2
		end
	end
	self.Calculation["Holy Shock"] = function( calculation )
		--Glyph of Holy Shock
		if self:HasGlyph(63224) then
			calculation.cooldown = calculation.cooldown - 1
		end
	end
	
	--Seals and judgements
	self.Calculation["Seal of Righteousness"] = function( calculation )
		--Glyph of Seal of Righteousness
		if self:HasGlyph(56414) then
			calculation.dmgM = calculation.dmgM * 1.1
		end
	end
	self.DmgCalculation["Seal of Righteousness"] = function( calculation )
		local spd = self:GetWeaponSpeed()
		calculation.minDam = spd * (0.022 * calculation.AP  + 0.044 * calculation.spellDmg)
		calculation.maxDam = calculation.minDam
		return spd * 0.022
	end
	
	--Seal of Command
	self.Calculation["Seal of Command"] = function( calculation )
		local spd = self:GetWeaponSpeed()
		--Glyph of Seal of Command
		calculation.procPerc = (spd * 7)/60 * (self:HasGlyph(54925) and 1.2 or 1)
	end
	
	--Seal and Judgement of Vengeance/Corruption
	self.Calculation["Judgement of Vengeance"] = function( calculation, ActiveAuras )
		if ActiveAuras["Holy Vengeance"] then
			calculation.dmgM = calculation.dmgM * (1 + 0.1 * ActiveAuras["Holy Vengeance"])
		end
	end
	self.Calculation["Judgement of Corruption"] = function( calculation, ActiveAuras )
		if ActiveAuras["Blood Corruption"] then
			calculation.dmgM = calculation.dmgM * (1 + 0.1 * ActiveAuras["Blood Corruption"])
		end
	end
	self.Calculation["Judgement of Command"] = function( calculation, ActiveAuras )
		if ActiveAuras["Stun"] then
			calculation.critPerc = 100
		end
	end

	
	--Relic slot items
	--Libram of the Eternal Rest, Libram of Resurgence
	self.RelicSlot["Consecration"] = { 27917, 47, 40337, 141 }
	--Libram of Righteous Power, Libram of Radiance
	self.RelicSlot["Crusader Strike"] = { 31033, 36.3, 40191, 115.5 }
	--Savage Gladiator's Libram of Justice, Hateful Gladiator's Libram of Justice, Furious Gladiator's Libram of Justice, Deadly Gladiator's Libram of Justice, 
	--Libram of Souls Redeemed, Libram of Light, Blessed Book of Nagrand, Libram of Divinity,
	self.RelicSlot["Flash of Light"] = { 42612, 204, 42613, 236, 42615, 320, 42614, 267, 28592, 89, 23006, 43, 25644, 79, 23201, 28, }
	--Libram of the Lightbringer, Libram of the Resolute, Libram of Tolerance
	self.RelicSlot["Holy Light"] = { 28296, 47, 45436, 160, 40268, 141 }
	--Libram of Divine Purpose
	self.RelicSlot["Seal of Rightenousness"] = { 33504, 94, ModType = "spellDmg" }
	self.RelicSlot["Judgement of Righteousness"] = { 33504, 94, ModType = "spellDmg" }
	--Libram of Wracking
	self.RelicSlot["Exorcism"] = { 28065, 120 }
	self.RelicSlot["Holy Wrath"] = { 28065, 120 }
	--Libram of Discord, Venture Co. Libram of Retribution
	self.RelicSlot["Divine Storm"] = { 45510, 235, 38362, 81, ModType2 = "dmgBonus" }
	--Venture Co. Libram of Mostly Holy Deeds
	self.RelicSlot["Holy Shock"] = { 38364, 69, ModType = "finalMod" }
	--Venture Co. Libram of Protection
	self.RelicSlot["Shield of Righteousness"] = { 38363, 96, ModType = "finalMod" }
    
	--Set bonuses
	
	--Sets (NOTE: Only Season 5 onward)
	self.SetBonuses["PvP Healing Gloves"] = { 40918, 40925, 40926, }
	self.SetBonuses["PvP Retri Gloves"] = { 40798, 40802, 40805, }
	self.SetBonuses["PvP Healing"] = { 40898, 40918, 40930, 40936, 40960, 40904, 40925, 40931, 40937, 40961, 40905, 40926, 40932, 40938, 40962 }
        self.SetBonuses["PvP Retri"] = { 40785, 40805, 40825, 40846, 40864, 40782, 40802, 40821, 40842, 40861, 40780, 40798, 40818, 40838, 40858 }
	
	--T7
	self.SetBonuses["Redemption Regalia"] = { 39628, 39629, 39630, 39631, 39632, 40569, 40570, 40571, 40572, 40573 }
	self.SetBonuses["Redemption Plate"] = { 39638, 39639, 39640, 39641, 39642, 40579, 40580, 40581, 40583, 40584 }
	self.SetBonuses["Redemption Battlegear"] = { 39633, 39634, 39635, 39636, 39637, 40574, 40575, 40576, 40577, 40578 }
	--T8
	self.SetBonuses["Aegis Regalia"] = { 45370, 45371, 45372, 45373, 45374, 46178, 46179, 46180, 46181, 46182 }
	self.SetBonuses["Aegis Plate"] = { 45381, 45382, 45383, 45384, 45385, 46173, 46174, 46175, 46176, 46177 }
	self.SetBonuses["Aegis Battlegear"] = { 45375, 45376, 45377, 45379, 45380, 46152, 46153, 46154, 46155, 46156 }
	
	--Effects
	self.SetBonuses["Seal of Vengeance"] = function( calculation )
		if self:GetSetAmount( "Aegis Plate" ) >= 2 then
			calculation.dmgM = calculation.dmgM * 1.1
		end	
	end
	self.SetBonuses["Seal of Righteousness"] = self.SetBonuses["Seal of Vengeance"]
	self.SetBonuses["Seal of Corruption"] = self.SetBonuses["Seal of Vengeance"]
	
	self.SetBonuses["Holy Shock"] = function( calculation )
		if calculation.healingSpell and self:GetSetAmount( "PvP Healing" ) >= 4 then
			calculation.dmgM = calculation.dmgM * 1.1
		end
		if self:GetSetAmount( "Redemption Regalia" ) >= 2 then
			calculation.critPerc = calculation.critPerc + 10
		end
		if calculation.healingSpell and self:GetSetAmount( "Aegis Regalia" ) >= 2 then
			calculation.extraCrit = (calculation.extraCrit or 0) + 0.15
			calculation.extraChance = calculation.critPerc/100
			calculation.extraTicks = calculation.extraTicks or 3
			calculation.extraName = "2p T8"
		end
	end
	self.SetBonuses["Hammer of the Righteous"] = function( calculation )
		if self:GetSetAmount( "Redemption Plate" ) >= 2 then
			calculation.dmgM = calculation.dmgM * 1.1
		end
	end
	self.SetBonuses["Crusader Strike"] = function( calculation )
		if self:GetSetAmount( "Aegis Battlegear" ) >= 4 then
			calculation.critPerc = calculation.critPerc + 10
		end
		--PvP Retri Gloves
		if self:GetSetAmount( "PvP Retri Gloves" ) >= 1 then
			calculation.dmgM = calculation.dmgM * 1.05
		end		
	end
	self.SetBonuses["Divine Storm"] = function( calculation )
		if self:GetSetAmount( "Redemption Battleplate" ) >= 2 then
			calculation.dmgM = calculation.dmgM * 1.1
		end
		if self:GetSetAmount( "Aegis Battlegear" ) >= 4 then
			calculation.critPerc = calculation.critPerc + 10
		end
	end
	self.SetBonuses["Exorcism"] = function( calculation )
		if self:GetSetAmount( "Aegis Battlegear" ) >= 2 then
			calculation.dmgM = calculation.dmgM * 1.1
		end
	end
	self.SetBonuses["Hammer of Wrath"] = self.SetBonuses["Exorcism"]
	
--AURA
--Player
	--Seal of Righteousness
	--Seal of Command
	--Seal of Blood
	--Seal of the Martyr
	--Seal of Corruption
	--Seal of Vengeance
	--Seal of Justice
	--Seal of Wisdom
	--Divine Illumination
	--Judgements of the Pure
	self.PlayerAura[GetSpellInfo(21084)] = { Update = true }
	self.PlayerAura[GetSpellInfo(20375)] = self.PlayerAura[GetSpellInfo(21084)]
	self.PlayerAura[GetSpellInfo(31892)] = self.PlayerAura[GetSpellInfo(21084)]
	self.PlayerAura[GetSpellInfo(53720)] = self.PlayerAura[GetSpellInfo(21084)]
	self.PlayerAura[GetSpellInfo(53736)] = self.PlayerAura[GetSpellInfo(21084)]
	self.PlayerAura[GetSpellInfo(31801)] = self.PlayerAura[GetSpellInfo(21084)]
	self.PlayerAura[GetSpellInfo(20164)] = self.PlayerAura[GetSpellInfo(21084)]
	self.PlayerAura[GetSpellInfo(20166)] = self.PlayerAura[GetSpellInfo(21084)]
	self.PlayerAura[GetSpellInfo(31842)] = self.PlayerAura[GetSpellInfo(21084)]
	self.PlayerAura[GetSpellInfo(54153)] = self.PlayerAura[GetSpellInfo(21084)]	
	--Seal of Light
	self.PlayerAura[GetSpellInfo(20165)] = { Caster = true, School = "Healing", ModType = "Special" }	
	--The Art of War
	self.PlayerAura[GetSpellInfo(53489)] = { Update = true, Spells = GetSpellInfo(19750) }
	--Light's Grace
	self.PlayerAura[GetSpellInfo(31834)] = { Update = true, Spells = GetSpellInfo(635) }
	--Divine Favor
	self.PlayerAura[GetSpellInfo(20216)] = { Caster = true, Spells = { [GetSpellInfo(19750)] = true, [GetSpellInfo(635)] = true, [GetSpellInfo(20473)] = true, }, ModType = "critPerc", Value = 100, }
	--Infusion of Light
	self.PlayerAura[GetSpellInfo(53569)] = { Caster = true, Spells = GetSpellInfo(635), ModType = "critPerc", Ranks = 2, Value = 10, }
--Target	
	--Holy Vengeance
	self.TargetAura[GetSpellInfo(31803)] = { Melee = true, ActiveAura = "Holy Vengeance", SelfCast = true }
	--Blood Corruption
	self.TargetAura[GetSpellInfo(53742)] = { Melee = true, ActiveAura = "Blood Corruption", SelfCast = true }
	--Sacred Shield
	self.TargetAura[GetSpellInfo(58597)] = { Texture = "Ability_Paladin_GaurdedbytheLight", ModType = "critPerc", Value = 50, Spells = GetSpellInfo(19750), SelfCastBuff = true }
--Auras
	--Concentration
	--Crusader
	--Devotion
	--Fire Resistance
	--Frost Resitance
	--Shadow Resistance
	--Retribution
	self.TargetAura[GetSpellInfo(19746)] = 	{ School = "Healing", ActiveAura = "Improved Devotion Aura", SelfCastBuff = true, Manual = GetSpellInfo(20140) }
	self.TargetAura[GetSpellInfo(32223)] = 	self.TargetAura[GetSpellInfo(19746)]
	self.TargetAura[GetSpellInfo(465)] = 	self.TargetAura[GetSpellInfo(19746)]
	self.TargetAura[GetSpellInfo(19891)] = 	self.TargetAura[GetSpellInfo(19746)]
	self.TargetAura[GetSpellInfo(19888)] = 	self.TargetAura[GetSpellInfo(19746)]
	self.TargetAura[GetSpellInfo(19876)] = 	self.TargetAura[GetSpellInfo(19746)]
	self.TargetAura[GetSpellInfo(7294)] = 	self.TargetAura[GetSpellInfo(19746)]
--Stuns
	--Impact
	self.TargetAura[GetSpellInfo(12355)] = { ActiveAura = "Stun", Melee = true, Spells = { [GetSpellInfo(20271)] = true, [GetSpellInfo(53407)] = true, [GetSpellInfo(53408)] = true, ["Judgement of Command"] = true }, Manual = GetSpellInfo(47923) }
	--Gouge
	self.TargetAura[GetSpellInfo(1776)] = self.TargetAura[GetSpellInfo(12355)]
	--Repentance
	self.TargetAura[GetSpellInfo(20066)] = self.TargetAura[GetSpellInfo(12355)]
	--Maim
	self.TargetAura[GetSpellInfo(22570)] = self.TargetAura[GetSpellInfo(12355)]
	--Bash
	self.TargetAura[GetSpellInfo(8983)] = self.TargetAura[GetSpellInfo(12355)]
	--Pounce
	self.TargetAura[GetSpellInfo(9005)] = self.TargetAura[GetSpellInfo(12355)]
	--Intimidation
	self.TargetAura[GetSpellInfo(19577)] = self.TargetAura[GetSpellInfo(12355)]
	--Hammer of Justice
	self.TargetAura[GetSpellInfo(10308)] = self.TargetAura[GetSpellInfo(12355)]
	--Stun (Seal of Justice)
	self.TargetAura[GetSpellInfo(20170)] = self.TargetAura[GetSpellInfo(12355)]
	--Kidney Shot
	self.TargetAura[GetSpellInfo(8643)] = self.TargetAura[GetSpellInfo(12355)]
	--Cheap Shot
	self.TargetAura[GetSpellInfo(1833)] = self.TargetAura[GetSpellInfo(12355)]
	--Shadowfury
	self.TargetAura[GetSpellInfo(30283)] = self.TargetAura[GetSpellInfo(12355)]
	--Intercept
	self.TargetAura[GetSpellInfo(30153)] = self.TargetAura[GetSpellInfo(12355)]
	--Charge
	self.TargetAura[GetSpellInfo(7922)] = self.TargetAura[GetSpellInfo(12355)]
	--Concussion Blow
	self.TargetAura[GetSpellInfo(12809)] = self.TargetAura[GetSpellInfo(12355)]

--Special aura handling	
	--Seal of Light
	self.Calculation[GetSpellInfo(20165)] = function( calculation )
		--Glyph of Seal of Light
		if self:HasGlyph( 54943 ) then
			calculation.dmgM = calculation.dmgM * 1.05
		end
	end
	
	self.spellInfo = {
		[GetSpellInfo(31935)] = {
					--DONE: BASE OK, INCREASE OK, COEFFICIENT OK
					--200% crit, Melee hit
					["Name"] = "Avenger's Shield",
					[0] = { School = "Holy", MeleeCrit = true, MeleeHit = true, SpellAPBonus = 0.07, bonusFactor = 0.07, canCrit = true, chainFactor = 1, Cooldown = 30, },
					[1] = { 440, 536, spellLevel = 50, },
					[2] = { 601, 733, spellLevel = 60, }, 
					[3] = { 796, 972, spellLevel = 70, }, 
					[4] = { 913, 1115, spellLevel = 75, }, 
					[5] = { 1100, 1344, spellLevel = 80, }, 
		},
		[GetSpellInfo(24275)] = {
					--DONE: BASE OK, INCREASE OK, COEFFICIENT OK
					--200% crit (verify), Melee Hit
					["Name"] = "Hammer of Wrath",
					[0] = { School = "Holy", MeleeCrit = true, MeleeHit = true, SpellAPBonus = 0.15, bonusFactor = 0.15, canCrit = true, Cooldown = 6, BaseIncrease = true, },
					[1] = { 351, 387, 86, 87, spellLevel = 44, },
					[2] = { 459, 507, 75, 76, spellLevel = 52, },
					[3] = { 570, 628, 62, 62, spellLevel = 60, },
					[4] = { 733, 809, 42, 42, spellLevel = 68, },
					[5] = { 878, 970, 24, 24, spellLevel = 74, },
					[6] = { 1139, 1257, 0, 0, spellLevel = 80, },
		},		
		[GetSpellInfo(20925)] = {
					--BASE OK, INCREASE OK, COEFFICIENT X
					--No crits, Spell hit
					["Name"] = "Holy Shield",
					[0] = { School = "Holy", SpellAPBonus = 0.63--[[0.5824--]], bonusFactor = 0.72, NoDPS = true, NoDoom = true, sHits = 8, },
					[1] = { 79, 79, spellLevel = 40, },
					[2] = { 116, 116, spellLevel = 50, },
					[3] = { 157, 157, spellLevel = 60, },
					[4] = { 208, 208, spellLevel = 70, },
					[5] = { 235, 235, spellLevel = 75, },
					[6] = { 274, 274, spellLevel = 80, },
		},
		[GetSpellInfo(879)] = {
					--DONE: BASE OK, INCREASE OK, COEFFICIENT OK
					--150% crit, Spell hit
					["Name"] = "Exorcism",
					[0] = { School = "Holy", SpellAPBonus = 0.15, bonusFactor = 0.15, canCrit = true, Cooldown = 15, BaseIncrease = true, },
					[1] = { 96, 110, 72, 72, spellLevel = 20, },
					[2] = { 173, 195, 83, 84, spellLevel = 28, },
					[3] = { 250, 280, 88, 90, spellLevel = 36, },
					[4] = { 350, 394, 86, 87, spellLevel = 44, },
					[5] = { 452, 506, 78, 79, spellLevel = 52, },
					[6] = { 564, 628, 64, 64, spellLevel = 60, },
					[7] = { 687, 765, 42, 42, spellLevel = 68, },
					[8] = { 787, 877, 28, 28, spellLevel = 73, },
					[9] = { 1028, 1146, 5, 5, spellLevel = 79, },
		},
		[GetSpellInfo(2812)] = {
					--DONE: BASE OK, INCREASE OK, COEFFICIENT OK
					--150% crit, Spell hit
					["Name"] = "Holy Wrath",
					[0] = { School = "Holy", SpellAPBonus = 0.07, bonusFactor = 0.07, canCrit = true, BaseIncrease = true },
					[1] = { 399, 471, 48, 48, spellLevel = 50, },
					[2] = { 551, 649, 38, 38, spellLevel = 60, },
					[3] = { 777, 913, 24, 25, spellLevel = 69, },
					[4] = { 857, 1007, 24, 24, spellLevel = 72, },
					[5] = { 1050, 1234, 8, 8, spellLevel = 78, },
		},
		[GetSpellInfo(62124)] = {
					--BASE OK, INCREASE OK, COEFFICIENT OK
					--crits?, Spell hit
 					["Name"] = "Hand of Reckoning",
 					[0] = { School = "Holy", Cooldown = 8, bonusFactor = 0.085, canCrit = true, NoLowLevelPenalty = true },
 					[1] = { 1, 1, spellLevel = 16 },
 		},		
		[GetSpellInfo(20473)] = {
					--BASE OK, INCREASE OK, COEFFICIENT X
					["Name"] = "Holy Shock",
					[0] = { School = { "Holy", "Healing", "Holy Shock Heal" }, bonusFactor = 0.81/1.88, canCrit = true, Cooldown = 6, },
					[1] = { 481, 519, spellLevel = 40, },
					[2] = { 644, 696, spellLevel = 48, },
					[3] = { 845, 915, spellLevel = 56, },
					[4] = { 1061, 1149, spellLevel = 64, },
					[5] = { 1258, 1362, spellLevel = 70, },
					[6] = { 2065, 2235, spellLevel = 75, },
					[7] = { 2401, 2599, spellLevel = 80, },
					
			["Secondary"] = { 
					["Name"] = "Holy Shock",
					[0] = { School = "Holy", canCrit = true, Cooldown = 6, },
					[1] = { 314, 340, spellLevel = 40, },
					[2] = { 431, 465, spellLevel = 48, },
					[3] = { 562, 608, spellLevel = 56, },
					[4] = { 693, 749, spellLevel = 64, },
					[5] = { 904, 978, spellLevel = 70, },
					[6] = { 1043, 1129, spellLevel = 75, },
					[7] = { 1296, 1402, spellLevel = 80, },
			},
		},		
		[GetSpellInfo(26573)] = {
					--DONE: BASE OK, INCREASE OK, COEFFICIENT OK
					--No crits, Spell hit
					["Name"] = "Consecration",
					[0] = { School = "Holy", eDot = true, eDuration = 8, SpellAPBonus = 0.32, bonusFactor = 0.32, sTicks = 1, },
					[1] = { 72, 72, spellLevel = 20, },
					[2] = { 136, 136, spellLevel = 30, },
					[3] = { 224, 224, spellLevel = 40, },
					[4] = { 336, 336, spellLevel = 50, },
					[5] = { 448, 448, spellLevel = 60, },
					[6] = { 576, 576, spellLevel = 70, },
					[7] = { 696, 696, spellLevel = 75, },
					[8] = { 904, 904, spellLevel = 80, },
		},		
		[GetSpellInfo(635)] = { --BASE OK, INCREASE OK, COEFFICIENT X
					["Name"] = "Holy Light",
					[0] = { School = { "Holy", "Healing" }, bonusFactor = 1.66/1.88, canCrit = true, castTime = 2.5, BaseIncrease = true, },
					[1] = { 50, 60, 63, 64, spellLevel = 1, },
					[2] = { 96, 116, 81, 82, spellLevel = 6, },
					[3] = { 203, 239, 112, 113, spellLevel = 14, },
					[4] = { 397, 455, 139, 140, spellLevel = 22, },
					[5] = { 628, 708, 155, 155, spellLevel = 30, },
					[6] = { 894, 998, 159, 160, spellLevel = 38, },
					[7] = { 1209, 1349, 156, 157, spellLevel = 46, },
					[8] = { 1595, 1777, 135, 136, spellLevel = 54, },
					[9] = { 2034, 2266, 116, 116, spellLevel = 60, },
					[10] = { 2232, 2486, 115, 116, spellLevel = 62, },
					[11] = { 2818, 3138, 70, 70, spellLevel = 70, },
					[12] = { 4199, 4677, 52, 52, spellLevel = 75, },
					[13] = { 4888, 5444, 0, 0, spellLevel = 80, },
		},	
		[GetSpellInfo(19750)] = {
					--BASE OK, INCREASE OK, COEFFICIENT X
					["Name"] = "Flash of Light",
					[0] = { School = { "Holy", "Healing" }, bonusFactor = 1.0/1.88, canCrit = true, castTime = 1.5, BaseIncrease = true, },
					[1] = { 81, 93, 60, 60, spellLevel = 20, },
					[2] = { 124, 144, 70, 71, spellLevel = 26, },
					[3] = { 189, 211, 73, 74, spellLevel = 34, },
					[4] = { 256, 288, 72, 73, spellLevel = 42, },
					[5] = { 346, 390, 66, 66, spellLevel = 50, },
					[6] = { 445, 499, 57, 58, spellLevel = 58, },
					[7] = { 588, 658, 42, 42, spellLevel = 66, },
					[8] = { 682, 764, 20, 21, spellLevel = 74, },
					[9] = { 785, 879, 3, 4, spellLevel = 79, },
		},
		[GetSpellInfo(53601)] = {
					--BASE OK, INCREASE OK, COEFFICIENT X
					["Name"] = "Sacred Shield",
					[0] = { School = { "Holy", "Healing" }, bonusFactor = 0.75/1.88, castTime = 1.5, Cooldown = 6 },
					[1] = { 500, 500, spellLevel = 80, },
		},						
		[GetSpellInfo(35395)] = {
					["Name"] = "Crusader Strike",
					[0] = { Melee = true, WeaponDamage = 1.1, Cooldown = 6, },
					[1] = { 0, 0, },
		},
		[GetSpellInfo(53385)] = {
					["Name"] = "Divine Storm",
					[0] = { Melee = true, WeaponDamage = 1.1, Hits = 4, Cooldown = 10 },
					[1] = { 0, 0 },
		},
		[GetSpellInfo(53600)] = { 
					["Name"] = "Shield of Righteousness",
					[0] = { School = "Holy", Melee = true, Cooldown = 6 },
					[1] = { 390, 390, spellLevel = 75 },
					[2] = { 520, 520, spellLevel = 80 },
		},
        	[GetSpellInfo(53595)] = { 
					["Name"] = "Hammer of the Righteous",
					[0] = { School = "Holy", Melee = true, APBonus = 4/14, Hits = 3, Cooldown = 6 },
					[1] = { 0, 0, },
		},		
		--Seals
		[GetSpellInfo(21084)] = {
					--Note: SP and AP bonuses handled as a special case
					["Name"] = "Seal of Righteousness",
					[0] = { School = { "Holy", "Seal" }, Melee = true, APBonus = 0, SPBonus = 0, NoCrits = true, WeaponDPS = true, NoWeapon = true, NoDPM = true, Unavoidable = true },
					[1] = { 0 },
		},
		[GetSpellInfo(20375)] = {
					["Name"] = "Seal of Command",
					[0] = { School = { "Holy", "Seal" }, Melee = true, SPBonus = 0.1035, WeaponDamage = 0.45, WeaponDPS = true, NoWeapon = true, NoDPM = true },
					[1] = { 0 },
		},
		[GetSpellInfo(31892)] = {
					["Name"] = "Seal of Blood",
					[0] = { School = { "Holy", "Seal" }, Melee = true, WeaponDamage = 0.48, WeaponDPS = true, NoWeapon = true, NoDPM = true },
					[1] = { 0 },
		},
		[GetSpellInfo(53720)] = {
					["Name"] = "Seal of the Martyr",
					[0] = { School = { "Holy", "Seal" }, Melee = true, WeaponDamage = 0.48, WeaponDPS = true, NoWeapon = true, NoDPM = true },
					[1] = { 0 },
		},		
		[GetSpellInfo(31801)] = {
					["Name"] = "Seal of Vengeance",
					[0] = { School = { "Holy", "Seal" }, Melee = true, SPBonus = 0.078, APBonus = 0.15, Stacks = 5, Ticks = 3, eDuration = 15, NoDPM = true, Unavoidable = true },
					[1] = { 0, 0 },
		},
		[GetSpellInfo(53736)] = {
					["Name"] = "Seal of Corruption",
					[0] = { School = { "Holy", "Seal" }, Melee = true, SPBonus = 0.078, APBonus = 0.15, Stacks = 5, Ticks = 3, eDuration = 15, NoDPM = true, Unavoidable = true },
					[1] = { 0, 0, },
		},
		["Judgements"] = { [GetSpellInfo(21084)] = "Judgement of Righteousness", [GetSpellInfo(20375)] = "Judgement of Command", [GetSpellInfo(31801)] = "Judgement of Vengeance", [GetSpellInfo(53736)] = "Judgement of Corruption", [GetSpellInfo(31892)] = "Judgement of Blood", [GetSpellInfo(53720)] = "Judgement of the Martyr", [GetSpellInfo(20165)] = "Judgement of Light(s)", [GetSpellInfo(20166)] = "Judgement of Wisdom(s)", [GetSpellInfo(20164)] = "Judgement of Justice(s)" },
		[GetSpellInfo(20271)] = {
					["Name"] = "Judgement of Light",
					[0] = function()
						for k, v in pairs(self.spellInfo["Judgements"]) do
							local active, rank = UnitBuff("player", k)
							if active then
								return self.spellInfo[v][0], self.spellInfo[v][1], v
							end
						end
					end
		},
		[GetSpellInfo(53408)] = {
					["Name"] = "Judgement of Wisdom",
					[0] = function()
						for k, v in pairs(self.spellInfo["Judgements"]) do
							local active, rank = UnitBuff("player", k)
							if active then
								return self.spellInfo[v][0], self.spellInfo[v][1], v
							end
						end
					end
		},
		[GetSpellInfo(53407)] = {
					["Name"] = "Judgement of Justice",
					[0] = function()
						for k, v in pairs(self.spellInfo["Judgements"]) do
							local active, rank = UnitBuff("player", k)
							if active then
								return self.spellInfo[v][0], self.spellInfo[v][1], v
							end
						end
					end
		},
		["Judgement of Righteousness"] = {
					["Name"] = "Judgement of Righteousness",
					[0] = { School = { "Holy", "Judgement" }, Melee = true, SPBonus = 0.32, APBonus = 0.2, Cooldown = 10, Unavoidable = true },
					[1] = { 1, 1 },
		},
		["Judgement of Command"] = {
					["Name"] = "Judgement of Command",
					[0] = { School = { "Holy", "Judgement", }, Melee = true, SPBonus = 0.25, APBonus = 0.16, WeaponDamage = 0.24,  Cooldown = 10, Unavoidable = true },
					[1] = { 0, 0 },
		},
		["Judgement of Blood"] = {
					["Name"] = "Judgement of Blood",
					[0] = { School = { "Holy", "Judgement", }, Melee = true, SPBonus = 0.18, APBonus = 0.11, WeaponDamage = 0.26, Cooldown = 10, Unavoidable = true },
					[1] = { 0, 0 },
		},
		["Judgement of the Martyr"] = {
					["Name"] = "Judgement of the Martyr",
					[0] = { School = { "Holy", "Judgement", }, Melee = true, SPBonus = 0.18, APBonus = 0.11, WeaponDamage = 0.26, Cooldown = 10, Unavoidable = true },
					[1] = { 0, 0 },
		},
		["Judgement of Vengeance"] = {
					["Name"] = "Judgement of Vengeance",
					[0] = { School = { "Holy", "Judgement" }, Melee = true, SPBonus = 0.22, APBonus = 0.14, Cooldown = 10, Unavoidable = true },
					[1] = { 1, 1 },
		},
		["Judgement of Corruption"] = {
					["Name"] = "Judgement of Corruption",
					[0] = { School = { "Holy", "Judgement" }, Melee = true, SPBonus = 0.22, APBonus = 0.14, Cooldown = 10, Unavoidable = true },
					[1] = { 1, 1 },
		},
		["Judgement of Light(s)"] = {
					["Name"] = "Judgement of Light(s)",
					[0] = { School = { "Holy", "Judgement" }, Melee = true, SPBonus = 0.25, APBonus = 0.16, Cooldown = 10, Unavoidable = true },
					[1] = { 1, 1 },
		},
		["Judgement of Wisdom(s)"] = {
					["Name"] = "Judgement of Wisdom(s)",
					[0] = { School = { "Holy", "Judgement" }, Melee = true, SPBonus = 0.25, APBonus = 0.16, Cooldown = 10, Unavoidable = true },
					[1] = { 1, 1 },
		},
		["Judgement of Justice(s)"] = {
					["Name"] = "Judgement of Justice(s)",
					[0] = { School = { "Holy", "Judgement" }, Melee = true, SPBonus = 0.25, APBonus = 0.16, Cooldown = 10, Unavoidable = true },
					[1] = { 1, 1 },
		},
	}
	self.talentInfo = { 
		--HOLY:
		--Seals of the Pure
		[GetSpellInfo(20332)] = { 	[1] = { Effect = 0.03, Melee = true, Spells = { "Seal of Righteousness", "Judgement of Righteousness",  "Seal of Vengeance", "Judgement of Vengeance", "Seal of Corruption", "Judgement of Corruption"}, }, },
		--Healing Light
		[GetSpellInfo(20237)] = { 	[1] = { Effect = 0.04, Caster = true, Spells = { "Holy Light", "Flash of Light", "Holy Shock" }, }, },
		--Illumination
		[GetSpellInfo(20210)] = { 	[1] = { Effect = 0.12, Caster = true, Spells = { "Holy Light", "Flash of Light", "Holy Shock" }, ModType = "freeCrit" }, },
		--Sanctified Light
		[GetSpellInfo(20359)] = { 	[1] = { Effect = 2, Caster = true, Spells = { "Holy Light", "Holy Shock" }, ModType = "critPerc" }, },
		--Purifying Power
		[GetSpellInfo(31825)] = { 	[1] = { Effect = { -0.17, -0.33 }, Caster = true, Multiply = true, Spells = { "Exorcism", "Holy Wrath" }, ModType = "cooldown" }, },
        	--Holy Power
        	[GetSpellInfo(5923)]  = {   	[1] = { Effect = 1, Melee = true, Spells = "Holy", ModType = "critPerc" }, 
        					[2] = { Effect = 1, Caster = true, Spells = { "Avenger's Shield", "Hammer of Wrath" }, ModType = "critPerc" }, },
        	--Judgements of the Pure
        	[GetSpellInfo(53671)] = { 	[1] = { Effect = 0.05, Melee = true, Spells = { "Judgement", "Seal" }, }, },
        	--Enlightened Judgements
        	[GetSpellInfo(53556)]  = {   	[1] = { Effect = 2, Spells = "All", ModType = "hitPerc" }, },
		
		--PROTECTION:
		--Divinity
		[GetSpellInfo(63646)] = { 	[1] = { Effect = 0.01, Caster = true, Spells = "Healing" }, },
		--Improved Devotion Aura
		[GetSpellInfo(20138)] = { 	[1] = { Effect = 0.02, Caster = true, Spells = "Healing", ModType = "Improved Devotion Aura" }, },	
		--Touched by the Light	
		[GetSpellInfo(53590)] = {	[1] = { Effect = 0.05, Caster = true, Spells = "Healing", ModType = "critM" }, },

		--RETRIBUTION:
		--Improved Judgements
		[GetSpellInfo(25956)] = { 	[1] = { Effect = -1, Melee = true, Spells = "Judgement", ModType = "cooldown" }, },
		--Sanctity of Battle
		[GetSpellInfo(32043)] = { 	[1] = { Effect = 0.05, Spells = { "Exorcism", "Crusader Strike" }, }, },
		--Crusade
		[GetSpellInfo(31866)] = { 	[1] = { Effect = 0.01, Spells = "All", ModType = "Crusade" }, },
		--Two-Handed Weapon Specialization
		[GetSpellInfo(20111)] = { 	[1] = { Effect = 0.02, Melee = true, Spells = "All", ModType = "Two-Handed Weapon Specialization" }, },
		--The Art of War
		[GetSpellInfo(53486)] = {	[1] = { Effect = 0.05, Melee = true, Spells = { "Judgement", "Crusader Strike", "Divine Storm" }, }, },
		--Fanaticism
		[GetSpellInfo(31879)] = { 	[1] = { Effect = 6, Melee = true, Spells = "Judgement", ModType = "critPerc" }, },
		--Sheath of Light
		[GetSpellInfo(53501)] = { 	[1] = { Effect = 0.2, Caster = true, Spells = { "Holy Light", "Flash of Light", "Holy Shock Heal" }, ModType = "Sheath of Light" }, },
		
		--Sactified Wrath
		[GetSpellInfo(53375)] = {	[1] = { Effect = 25, Caster = true, Spells = "Hammer of Wrath", ModType = "critPerc" }, },
		---Righteous Vengeance
		[GetSpellInfo(53380)] = {	[1] = { Effect = 0.1, Melee = true, Spells = { "Judgement", "Crusader Strike", "Divine Storm" }, ModType = "Righteous Vengeance" }, },
	}
end